package com.yzh.luckydraw.domain.strategy.repository;

import com.yzh.luckydraw.domain.strategy.model.aggregates.StrategyRich;
import com.yzh.luckydraw.domain.strategy.model.vo.AwardBriefVO;


import java.util.List;

/**
 * 仓储服务（对数据库查询信息统一封装）
 */
public interface IStrategyRepository {
    /**
     * 查询策略信息
     * @param strategyId
     * @return
     */
    StrategyRich queryStrategyRich(Long strategyId);

    /**
     * 查询奖品信息
     * @param awardId
     * @return
     */
    AwardBriefVO queryAwardInfo(String awardId);

    /**
     * 查询库存为空的奖品ID
     * @param strategyId
     * @return
     */
    List<String> queryNoStockStrategyAwardList(Long strategyId);

    /**
     * 扣减库存
     * @param strategyId
     * @param awardId
     * @return
     */
    boolean deductStock(Long strategyId, String awardId);
    
}
